home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / 4_level.sta < prev    next >
Text File  |  1995-03-23  |  2KB  |  87 lines

  1. Article 1637 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!pur-ee!mentor.cc.purdue.edu!noose.ecn.purdue.edu!iuvax!cica!tut.cis.ohio-state.edu!uc!norge.unet.umn.edu!fin
  3. From: fin@norge.unet.umn.edu (Craig A. Finseth)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: 4 Level Stack Emulator for the HP-48
  6. Message-ID: <1500@uc.msc.umn.edu>
  7. Date: 27 Mar 90 16:29:11 GMT
  8. Sender: news@uc.msc.umn.edu
  9. Organization: Univ Netw Serv, Univ of Minn
  10. Lines: 73
  11.  
  12.  
  13. Here is a partial emulator for a "traditional HP" 4-level stack
  14. machine.  I only did the operations that I thought worthwhile (but I
  15. did do % !).
  16. ------------------------------------------------------------
  17. Written by: Craig Finseth, University of Minnesota
  18. From: 24 Mar 1990
  19. What: 4-Level Stack Emulator (
  20.  
  21. R4KEYS    This contains the key definitions list for use in USER mode.
  22. R4INIT    Saves the value in the Last X register.
  23. R4FINI    Cleans up the stack, duplicating the 4th item, if present.
  24. R4LAST    The Last X register.
  25.  
  26. Keys Affected:
  27.  
  28.     key            does
  29.  
  30.     /> SWAP            Roll Down
  31.     SQRT            saves LASTX
  32.     ^            saves LASTX
  33.     INV            saves LASTX
  34.     /> DEL            % properly
  35.     /            saves LASTX
  36.     x            saves LASTX
  37.     /> 2 (Last Arg)    recall LASTX
  38.     -            saves LASTX
  39.     +            saves LASTX
  40.  
  41. Checksum: #14d
  42. Size: 528
  43. ------------------------------------------------------------
  44. %%HP: T(3)A(D)F(.);
  45. DIR
  46.   R4KEYS { S
  47.     \<< 4 ROLL
  48.     \>> 36.3
  49.     \<< R4INIT \v/
  50.     \>> 44.1
  51.     \<< R4INIT ^
  52. R4FINI
  53.     \>> 45.1
  54.     \<< R4INIT INV
  55.     \>> 46.1
  56.     \<< R4INIT OVER %
  57.     \>> 54.3
  58.     \<< R4INIT /
  59. R4FINI
  60.     \>> 65.1
  61.     \<< R4INIT *
  62. R4FINI
  63.     \>> 75.1
  64.     \<< 'R4LASTX' RCL
  65.     \>> 83.3
  66.     \<< R4INIT -
  67. R4FINI
  68.     \>> 85.1
  69.     \<< R4INIT +
  70. R4FINI
  71.     \>> 95.1 }
  72.   R4INIT
  73.     \<< DUP 'R4LASTX'
  74. STO
  75.     \>>
  76.   R4FINI
  77.     \<<
  78.       IF DEPTH 3 \>=
  79.       THEN 3 ROLL
  80. DUP 4 ROLLD 4 ROLLD
  81.       END
  82.     \>>
  83.   R4LASTX 7
  84. END
  85.  
  86.  
  87.